﻿using System;
using System.Linq;

namespace Se.Framework.Web.Mvc.GenericCrud.Attributes
{
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
    public sealed class GenericCrudColumnAttribute : Attribute
    {
        public GenericCrudColumnAttribute()
        {
            RenderMode = GenericCrudRenderMode.Any;
            Sortable = true;
        }

        public GenericCrudRenderMode RenderMode { get; set; }

        public bool Sortable { get; set; }

        public Type SearchType { get; set; }

        public string SearchKey { get; set; }

        public Type ConverterType { get; set; }
    }
}